package com.flybutter.usagelab.broadcast

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent

const val CUSTOM_INTENT_ACTION_WIDGET_EVENT = "custom.intent.action.WIDGET_EVENT"

class WidgetEventReceiver : BroadcastReceiver() {

    override fun onReceive(context: Context, intent: Intent) {
        val packageName = intent.getStringExtra("packageName")!!
        val intent = context.packageManager.getLaunchIntentForPackage(packageName)
        context.startActivity(intent)
    }
}